import Vue from 'vue'
import Landing from './Landing'

// 1. 导入
import VueRouter from 'vue-router'

// 2. Vue.use(VueRouter)
Vue.use(VueRouter)

import App from './App'
import BMIApp from './BMIApp'
// 3. 实例化路由 router = new VueRouter()
const router = new VueRouter({
  routes: [
    {
      path: '/app',
      component: App
    },
    {
      path: '/bmi',
      component: BMIApp
    },
  ] // (缩写) 相当于 routes: routes
})

// import MyCounter from "./components/MyCounter";
Vue.config.productionTip = false
// 全局注册组件
// Vue.component('MyCounter', MyCounter)

// webpack
import './assets/css/reset.css'

new Vue({
  render: h => h(Landing),
  // 4. 将router实例挂在到vue中
  router
}).$mount('#app')
